export default {
  login () {
    sessionStorage.isLogin = true
  },
  logout () {
    delete sessionStorage.isLogin
  },
  loggedIn () {
    return sessionStorage.isLogin
  },
  setUserInfo (data) {
    localStorage.user = JSON.stringify(data)
  },
  getUserInfo () {
    if(localStorage.user){
      return JSON.parse(localStorage.user)
    }else{
      return null
    }
  }
}

